# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>

pkgname=xsel
pkgver=1.2.1
_commit=062e6d373537c60829fa9b5dcddbcd942986b3c3
pkgrel=1
pkgdesc="Command-line program for getting and setting the contents of the X selection"
arch=(loong64 x86_64)
url="https://vergenet.net/~conrad/software/xsel/"
license=("custom")
depends=('libx11')
makedepends=('libxt' 'git')
#source=(https://www.vergenet.net/~conrad/software/xsel/download/$pkgname-$pkgver.tar.gz)
source=("git+https://github.com/kfish/xsel.git#tag=${pkgver}")
sha512sums=('SKIP')

build() {
  cd $pkgname
  touch README
  [ -x configure ] && ./configure --prefix=/usr || ./autogen.sh --prefix=/usr
  make
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install
  mkdir -p "$pkgdir"/usr/share/licenses/xsel/
  install -D -m0644 COPYING "$pkgdir"/usr/share/licenses/xsel/COPYING
}
